<?php

class pm25Controller extends base
{

    public function __construct()
    {
        parent::__construct();
    }

    /**
     * 所有城市列表
     */
    public function dogetcities()
    {
        $this->result['result'] = $this->load('pm25')->getAllCity();
    }
    /**
     * 获取pm2.5信息
     */
    public function dogetPmLevel(){
        $city_id = common::request('city_id', 'P');
        $info = $this->load('pm25')->getLevel($city_id);
        $this->result['result'] = $info;
    }
}